/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.maternity.componentes.grid;

import java.util.List;

/**
 *
 * @author Aluno
 */
public class PersonalGridColumn {

    private String title;
    private String propertySourceName;
    private String formatStyle;
    private String redirectLink;
    private List<String> queryStringFields;
    private int width = 0;

    public PersonalGridColumn(String columnTitle, String propertyName, String dataFormatStyle) {
        title = columnTitle;
        propertySourceName = propertyName;
        formatStyle = dataFormatStyle;
    }

    public PersonalGridColumn(String columnTitle, String propertyName, String dataFormatStyle, String redirectPageLink, List<String> queryStringFieldsName) {
        title = columnTitle;
        propertySourceName = propertyName;
        formatStyle = dataFormatStyle;
        redirectLink = redirectPageLink;
        queryStringFields = queryStringFieldsName;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String columnTitle) {
        title = columnTitle;
    }

    public String getProperySourceName() {
        return propertySourceName;
    }

    public void setPropertySourceName(String propertyName) {
        propertySourceName = propertyName;
    }

    public String getFormatStyle() {
        return formatStyle;
    }

    public void setFormatStyle(String dataFormatStyle) {
        formatStyle = dataFormatStyle;
    }

    public boolean isLink() {
        if (redirectLink == null) {
            return false;
        }
        if (redirectLink.trim().equals("")) {
            return false;
        }
        return true;
    }

    public String getRedirectLink() {
        return redirectLink;
    }

    public void setRedirectLink(String redirectPageLink) {
        redirectLink = redirectPageLink;
    }

    public List<String> getQueryStringFields() {
        return queryStringFields;
    }

    public void setQueryStringFields(List<String> queryStringFieldsName) {
        queryStringFields = queryStringFieldsName;
    }

    public int getWidth() {
        return width;
    }

    public void setWidth(int _width) {
        width = _width;
    }
}
